package chapter5_polymorphic_PracticeOnTheMachine;

public class Car007 extends Common{
	
	private float Car1;
	private float Car2;
	private float Car3;
	private float Length;

	public Car007() {
	}
	
	public Car007(float c1, float c2, float c3) {
		this.Car1 = c1;
		this.Car2 = c2;
		this.Car3 = c3;
	}
	
	public Car007(float c1, float c2, float c3,float length) {
		this.Car1 = c1;
		this.Car2 = c2;
		this.Car3 = c3;
		this.Length = length;
	}
	
	public float speed() {
		float velocity = this.Car1 * this.Car2 / this.Car3;
		return velocity;
	}
	
	public float time() {
		float time = Length * 1000 / (this.Car1 * this.Car2 / this.Car3);
		return time;
		
	}

}
